Skip to content

feat: Allow using local Ollama models for AI assistant#360

Merged
BinaryMuse merged 12 commits intomainfrom
mkt/ai-providers
Jan 21, 2026
Merged

feat: Allow using local Ollama models for AI assistant#360
BinaryMuse merged 12 commits intomainfrom
mkt/ai-providers

Conversation

@BinaryMuse
Copy link
Member

@BinaryMuse BinaryMuse commented Jan 21, 2026

This PR lays the groundwork for allowing model selection for the AI features; currently, only local Ollama is supported (in addition to Atuin Hub); others may be added following similar patterns.

On hold pending jeremychone/rust-genai#124 (updated fork instead)

image

@BinaryMuse BinaryMuse marked this pull request as ready for review January 21, 2026 19:28
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 21, 2026

Greptile Summary

Adds support for using local Ollama models as an alternative to Atuin Hub for AI features. Changes span both backend (Rust) and frontend (TypeScript/React).

Key changes:

  • Backend now accepts model selection per message and supports no-auth providers (Ollama)
  • Tool results now use individual ChatRole::Tool messages instead of batching
  • New settings UI for provider selection and Ollama configuration
  • Model selection validated before sending messages

Issues found:

  • URL joining logic has bug with protocol handling (http:// becomes http:/)
  • Missing validation for empty model name when Ollama is enabled

Important Files Changed

Filename Overview
backend/src/ai/session.rs Added model parameter to send_user_message, changed API key to Option to support no-auth providers
backend/src/ai/fsm.rs Changed tool results to use individual ChatRole::Tool messages instead of batching in user message
src/state/settings_ai.ts New file: manages AI provider settings and model selection logic
src/components/runbooks/editor/ui/AIAssistant.tsx Retrieves selected model from settings and validates configuration before sending messages

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

BinaryMuse and others added 3 commits January 21, 2026 11:35
@BinaryMuse BinaryMuse requested a review from ellie January 21, 2026 19:41
@BinaryMuse BinaryMuse merged commit d99b2de into main Jan 21, 2026
9 checks passed
@BinaryMuse BinaryMuse deleted the mkt/ai-providers branch January 21, 2026 21:07
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants